<!DOCTYPE html>
<html lang="en">
  <head>
    <title>Attachment Class Reference</title>
    <link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
    <link rel="stylesheet" type="text/css" href="../css/highlight.css" />
    <meta charset='utf-8'>
    <script src="../js/jquery.min.js" defer></script>
    <script src="../js/jazzy.js" defer></script>
    
    <script src="../js/lunr.min.js" defer></script>
    <script src="../js/typeahead.jquery.js" defer></script>
    <script src="../js/jazzy.search.js" defer></script>
  </head>
  <body>
    <a name="//apple_ref/swift/Class/Attachment" class="dashAnchor"></a>
    <a title="Attachment Class Reference"></a>
    <header>
      <div class="content-wrapper">
        <p><a href="../index.html">Proton Docs</a> (68% documented)</p>
        <p class="header-right"><a href="https://github.com/rajdeep/proton"><img src="../img/gh.png" alt="GitHub"/>View on GitHub</a></p>
        <div class="header-right">
          <form role="search" action="../search.json">
            <input type="text" placeholder="Search documentation" data-typeahead>
          </form>
        </div>
      </div>
    </header>
    <div class="content-wrapper">
      <p id="breadcrumbs">
        <a href="../index.html">Proton Reference</a>
        <img id="carat" src="../img/carat.png" alt=""/>
        Attachment Class Reference
      </p>
    </div>
    <div class="content-wrapper">
      <nav class="sidebar">
        <ul class="nav-groups">
          <li class="nav-group-name">
            <a href="../Classes.html">Classes</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Classes/Attachment.html">Attachment</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/AttributesToggleCommand.html">AttributesToggleCommand</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/BackgroundStyle.html">BackgroundStyle</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/BoldCommand.html">BoldCommand</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/BorderStyle.html">BorderStyle</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/EditorCommandExecutor.html">EditorCommandExecutor</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/EditorView.html">EditorView</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/EditorViewContext.html">EditorViewContext</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/FontTraitToggleCommand.html">FontTraitToggleCommand</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/GridCell.html">GridCell</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/GridView.html">GridView</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/ItalicsCommand.html">ItalicsCommand</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/ListCommand.html">ListCommand</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/ListIndentCommand.html">ListIndentCommand</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/ListOutdentCommand.html">ListOutdentCommand</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/ListTextProcessor.html">ListTextProcessor</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/ShadowStyle.html">ShadowStyle</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/StrikethroughCommand.html">StrikethroughCommand</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/TableCell.html">TableCell</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/TableCellContentView.html">TableCellContentView</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/TableView.html">TableView</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/UnderlineCommand.html">UnderlineCommand</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/Utility.html">Utility</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Enums.html">Enumerations</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Enums/AsyncTextResolvingResult.html">AsyncTextResolvingResult</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/AttachmentSize.html">AttachmentSize</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/AttachmentType.html">AttachmentType</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/BackgroundMode.html">BackgroundMode</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/EditorContentMode.html">EditorContentMode</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/EditorContentType.html">EditorContentType</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/EditorHeight.html">EditorHeight</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/EditorKey.html">EditorKey</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/GridColumnWidth.html">GridColumnWidth</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/GridColumnWidth/ConstrainedWidth.html">– ConstrainedWidth</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/GridViewError.html">GridViewError</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/Indentation.html">Indentation</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/ListLineMarker.html">ListLineMarker</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/ListMarkerDebugOption.html">ListMarkerDebugOption</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/RoundedCornerStyle.html">RoundedCornerStyle</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/TableViewError.html">TableViewError</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Extensions.html">Extensions</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Extensions/EditorContentName.html">EditorContentName</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/NSAttributedString.html">NSAttributedString</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/NSAttributedString/Key.html">– Key</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/NSParagraphStyle.html">NSParagraphStyle</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/NSRange.html">NSRange</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/String.html">String</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/TextProcessingPriority.html">TextProcessingPriority</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/UIFont.html">UIFont</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/UITextRange.html">UITextRange</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Protocols.html">Protocols</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Protocols/AsyncAttachmentRenderingDelegate.html">AsyncAttachmentRenderingDelegate</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols.html#/s:6Proton23AsyncDeferredRenderableP">AsyncDeferredRenderable</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/AsyncTextResolving.html">AsyncTextResolving</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/AttachmentEncoding.html">AttachmentEncoding</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/AttachmentOffsetProviding.html">AttachmentOffsetProviding</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/AttachmentTypeIdentifying.html">AttachmentTypeIdentifying</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/AttributesDecoding.html">AttributesDecoding</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/BackgroundColorObserving.html">BackgroundColorObserving</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/BoundsObserving.html">BoundsObserving</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/DynamicBoundsProviding.html">DynamicBoundsProviding</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/EditorCommand.html">EditorCommand</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/EditorCommandExecutorDelegate.html">EditorCommandExecutorDelegate</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/EditorContentDecoding.html">EditorContentDecoding</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/EditorContentEncoder.html">EditorContentEncoder</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/EditorContentEncoding.html">EditorContentEncoding</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/EditorContentIdentifying.html">EditorContentIdentifying</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/EditorContentView.html">EditorContentView</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/EditorListFormattingProvider.html">EditorListFormattingProvider</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/EditorTextEncoding.html">EditorTextEncoding</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/EditorViewDelegate.html">EditorViewDelegate</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/Focusable.html">Focusable</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/GridViewDelegate.html">GridViewDelegate</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/LineNumberProvider.html">LineNumberProvider</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/SequenceGenerator.html">SequenceGenerator</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/TableViewDelegate.html">TableViewDelegate</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/TextProcessing.html">TextProcessing</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Structs.html">Structures</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Structs/AnyAttributeDecoding.html">AnyAttributeDecoding</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/AnyEditorContentAttachmentEncoding.html">AnyEditorContentAttachmentEncoding</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/AnyEditorContentDecoding.html">AnyEditorContentDecoding</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/AnyEditorTextEncoding.html">AnyEditorTextEncoding</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/AttachmentContentIdentifier.html">AttachmentContentIdentifier</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/AttachmentImage.html">AttachmentImage</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/AttachmentSelectionStyle.html">AttachmentSelectionStyle</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/CommandName.html">CommandName</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/DiamondBulletSequenceGenerator.html">DiamondBulletSequenceGenerator</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/EditorContent.html">EditorContent</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/EditorLine.html">EditorLine</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/GradientColors.html">GradientColors</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/GridCellStyle.html">GridCellStyle</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/GridCellStyle/BorderStyle.html">– BorderStyle</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/GridColumnConfiguration.html">GridColumnConfiguration</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/GridConfiguration.html">GridConfiguration</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/GridRowConfiguration.html">GridRowConfiguration</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/GridStyle.html">GridStyle</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/Gutter.html">Gutter</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/LineFormatting.html">LineFormatting</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/LineNumberFormatting.html">LineNumberFormatting</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/ListItem.html">ListItem</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/ListParser.html">ListParser</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/NumericSequenceGenerator.html">NumericSequenceGenerator</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/SquareBulletSequenceGenerator.html">SquareBulletSequenceGenerator</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Typealiases.html">Type Aliases</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Typealiases.html#/s:6Proton15AttachmentRangea">AttachmentRange</a>
              </li>
              <li class="nav-group-task">
                <a href="../Typealiases.html#/s:6Proton14AttachmentViewa">AttachmentView</a>
              </li>
              <li class="nav-group-task">
                <a href="../Typealiases.html#/s:6Proton25AttachmentViewIdentifyinga">AttachmentViewIdentifying</a>
              </li>
              <li class="nav-group-task">
                <a href="../Typealiases.html#/s:6Proton10Attributesa">Attributes</a>
              </li>
              <li class="nav-group-task">
                <a href="../Typealiases.html#/s:6Proton9Processeda">Processed</a>
              </li>
              <li class="nav-group-task">
                <a href="../Typealiases.html#/s:6Proton22TextProcessingPrioritya">TextProcessingPriority</a>
              </li>
            </ul>
          </li>
        </ul>
      </nav>
      <article class="main-content">
        <section>
          <section class="section">
            <h1>Attachment</h1>
              <div class="declaration">
                <div class="language">
                  
                  <pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">class</span> <span class="kt">Attachment</span> <span class="p">:</span> <span class="kt">NSTextAttachment</span><span class="p">,</span> <span class="kt"><a href="../Protocols/BoundsObserving.html">BoundsObserving</a></span></code></pre>

                </div>
              </div>
            <p>An attachment can be used as a container for any view object. Based on the <code><a href="../Enums/AttachmentSize.html">AttachmentSize</a></code> provided, the attachment automatically renders itself alongside the text in <code><a href="../Classes/EditorView.html">EditorView</a></code>.
<code>Attachment</code> also provides helper functions like <code>deleteFromContainer</code> and <code>rangeInContainer</code></p>

          </section>
          <section class="section task-group-section">
            <div class="task-group">
              <ul>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:6Proton10AttachmentC2idSSvp"></a>
                    <a name="//apple_ref/swift/Property/id" class="dashAnchor"></a>
                    <a class="token" href="#/s:6Proton10AttachmentC2idSSvp">id</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Identifier that uniquely identifies an attachment. Auto-generated.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">id</span><span class="p">:</span> <span class="kt">String</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:6Proton10AttachmentC18selectBeforeDeleteSbvp"></a>
                    <a name="//apple_ref/swift/Property/selectBeforeDelete" class="dashAnchor"></a>
                    <a class="token" href="#/s:6Proton10AttachmentC18selectBeforeDeleteSbvp">selectBeforeDelete</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Governs if the attachment should be selected before being deleted. When <code>true</code>, tapping the backspace key the first time on range containing <code>Attachment</code> will only
select the attachment i.e. show as highlighted. Tapping the backspace again will delete the attachment. If the value is <code>false</code>, the attachment will be deleted on the first backspace itself.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">selectBeforeDelete</span><span class="p">:</span> <span class="kt">Bool</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:6Proton10AttachmentC15estimatedHeight14CoreFoundation7CGFloatVvp"></a>
                    <a name="//apple_ref/swift/Property/estimatedHeight" class="dashAnchor"></a>
                    <a class="token" href="#/s:6Proton10AttachmentC15estimatedHeight14CoreFoundation7CGFloatVvp">estimatedHeight</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Estimated height for attachment when it is rendering asynchronously.
This will result in a blank placeholder with given height for the attachment to render.
When rendering completed, the Editor content will readjust to accomodate the actual height of <code>Attachment</code></p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">estimatedHeight</span><span class="p">:</span> <span class="kt">CGFloat</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:6Proton10AttachmentC22needsDeferredRenderingSbvp"></a>
                    <a name="//apple_ref/swift/Property/needsDeferredRendering" class="dashAnchor"></a>
                    <a class="token" href="#/s:6Proton10AttachmentC22needsDeferredRenderingSbvp">needsDeferredRendering</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Undocumented</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">needsDeferredRendering</span><span class="p">:</span> <span class="kt">Bool</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:6Proton10AttachmentC11selectOnTapSbvp"></a>
                    <a name="//apple_ref/swift/Property/selectOnTap" class="dashAnchor"></a>
                    <a class="token" href="#/s:6Proton10AttachmentC11selectOnTapSbvp">selectOnTap</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Determines if attachment should be selected on tap or not. Defaults to <code>false</code>.</p>
<div class="aside aside-note">
    <p class="aside-title">Note</p>
    Selection only takes place if the view in attachment does not handle touch i.e. if a button in AttachmentView is tapped,
<code>selectOnTap</code> will not work as the tap will be handled by the button.

</div>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">selectOnTap</span><span class="p">:</span> <span class="kt">Bool</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:6Proton10AttachmentC14selectionStyleAA0b9SelectionD0Vvp"></a>
                    <a name="//apple_ref/swift/Property/selectionStyle" class="dashAnchor"></a>
                    <a class="token" href="#/s:6Proton10AttachmentC14selectionStyleAA0b9SelectionD0Vvp">selectionStyle</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Determines the appearance for the selection rectangle of the attachment</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">selectionStyle</span><span class="p">:</span> <span class="kt"><a href="../Structs/AttachmentSelectionStyle.html">AttachmentSelectionStyle</a></span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:6Proton10AttachmentC11isBlockTypeSbvp"></a>
                    <a name="//apple_ref/swift/Property/isBlockType" class="dashAnchor"></a>
                    <a class="token" href="#/s:6Proton10AttachmentC11isBlockTypeSbvp">isBlockType</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Undocumented</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">isBlockType</span><span class="p">:</span> <span class="kt">Bool</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:6Proton10AttachmentC12isInlineTypeSbvp"></a>
                    <a name="//apple_ref/swift/Property/isInlineType" class="dashAnchor"></a>
                    <a class="token" href="#/s:6Proton10AttachmentC12isInlineTypeSbvp">isInlineType</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Undocumented</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">isInlineType</span><span class="p">:</span> <span class="kt">Bool</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:6Proton10AttachmentC6stringSo18NSAttributedStringCvp"></a>
                    <a name="//apple_ref/swift/Property/string" class="dashAnchor"></a>
                    <a class="token" href="#/s:6Proton10AttachmentC6stringSo18NSAttributedStringCvp">string</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Attributed string representation of the <code>Attachment</code>. This can be used directly to replace a range of text in <code><a href="../Classes/EditorView.html">EditorView</a></code></p>
<h3 id='usage-example' class='heading'>Usage Example</h3>
<pre class="highlight swift"><code><span class="k">let</span> <span class="nv">attachment</span> <span class="o">=</span> <span class="kt">Attachment</span><span class="p">(</span><span class="kt">PanelView</span><span class="p">(),</span> <span class="nv">size</span><span class="p">:</span> <span class="o">.</span><span class="n">fullWidth</span><span class="p">)</span>
<span class="k">let</span> <span class="nv">attrString</span> <span class="o">=</span> <span class="kt">NSMutableAttributedString</span><span class="p">(</span><span class="nv">string</span><span class="p">:</span> <span class="s">"This is a test string"</span><span class="p">)</span>
<span class="n">attrString</span><span class="o">.</span><span class="nf">append</span><span class="p">(</span><span class="n">attachment</span><span class="o">.</span><span class="n">string</span><span class="p">)</span>
<span class="n">editor</span><span class="o">.</span><span class="n">attributedText</span> <span class="o">=</span> <span class="n">attrString</span>
</code></pre>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">string</span><span class="p">:</span> <span class="kt">NSAttributedString</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:6Proton10AttachmentC4nameSo19PREditorContentNameCSgvp"></a>
                    <a name="//apple_ref/swift/Property/name" class="dashAnchor"></a>
                    <a class="token" href="#/s:6Proton10AttachmentC4nameSo19PREditorContentNameCSgvp">name</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Name of the content contained within the <code>Attachment</code></p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">name</span><span class="p">:</span> <span class="kt"><a href="../Structs/EditorContent.html">EditorContent</a></span><span class="o">.</span><span class="kt">Name</span><span class="p">?</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:6Proton10AttachmentC14contentEditorsSayAA10EditorViewCGvp"></a>
                    <a name="//apple_ref/swift/Property/contentEditors" class="dashAnchor"></a>
                    <a class="token" href="#/s:6Proton10AttachmentC14contentEditorsSayAA10EditorViewCGvp">contentEditors</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Undocumented</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">contentEditors</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Classes/EditorView.html">EditorView</a></span><span class="p">]</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:6Proton10AttachmentC23isPendingAsyncRenderingSbvp"></a>
                    <a name="//apple_ref/swift/Property/isPendingAsyncRendering" class="dashAnchor"></a>
                    <a class="token" href="#/s:6Proton10AttachmentC23isPendingAsyncRenderingSbvp">isPendingAsyncRendering</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Determines if Attachment is rendering async but is not  yet rendered</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">isPendingAsyncRendering</span><span class="p">:</span> <span class="kt">Bool</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:6Proton10AttachmentC17isInSelectedRangeSbvp"></a>
                    <a name="//apple_ref/swift/Property/isInSelectedRange" class="dashAnchor"></a>
                    <a class="token" href="#/s:6Proton10AttachmentC17isInSelectedRangeSbvp">isInSelectedRange</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Determines if attachment is in selected range in the container <code><a href="../Classes/EditorView.html">EditorView</a></code></p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">isInSelectedRange</span><span class="p">:</span> <span class="kt">Bool</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:6Proton10AttachmentC11contentSizeSo6CGSizeVSgvp"></a>
                    <a name="//apple_ref/swift/Property/contentSize" class="dashAnchor"></a>
                    <a class="token" href="#/s:6Proton10AttachmentC11contentSizeSo6CGSizeVSgvp">contentSize</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Undocumented</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">contentSize</span><span class="p">:</span> <span class="kt">CGSize</span><span class="p">?</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:6Proton10AttachmentC16frameInContainerSo6CGRectVSgvp"></a>
                    <a name="//apple_ref/swift/Property/frameInContainer" class="dashAnchor"></a>
                    <a class="token" href="#/s:6Proton10AttachmentC16frameInContainerSo6CGRectVSgvp">frameInContainer</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Attachment&rsquo;s frame in ints container <code><a href="../Classes/EditorView.html">EditorView</a></code>. The value may be nil if attachment is not rendered yet.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">frameInContainer</span><span class="p">:</span> <span class="kt">CGRect</span><span class="p">?</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:6Proton10AttachmentC19containerEditorViewAA0dE0CSgvp"></a>
                    <a name="//apple_ref/swift/Property/containerEditorView" class="dashAnchor"></a>
                    <a class="token" href="#/s:6Proton10AttachmentC19containerEditorViewAA0dE0CSgvp">containerEditorView</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p><code><a href="../Classes/EditorView.html">EditorView</a></code> containing this attachment</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">private(set)</span> <span class="k">weak</span> <span class="k">var</span> <span class="nv">containerEditorView</span><span class="p">:</span> <span class="kt"><a href="../Classes/EditorView.html">EditorView</a></span><span class="p">?</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:6Proton10AttachmentC14offsetProviderAA0B15OffsetProviding_pSgvp"></a>
                    <a name="//apple_ref/swift/Property/offsetProvider" class="dashAnchor"></a>
                    <a class="token" href="#/s:6Proton10AttachmentC14offsetProviderAA0B15OffsetProviding_pSgvp">offsetProvider</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Offsets for the attachment. Can be used to align attachment with the text. Defaults to <code>.zero</code></p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="k">weak</span> <span class="k">var</span> <span class="nv">offsetProvider</span><span class="p">:</span> <span class="kt"><a href="../Protocols/AttachmentOffsetProviding.html">AttachmentOffsetProviding</a></span><span class="p">?</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:6Proton10AttachmentC20containerContentNameSo08PREditordE0CSgvp"></a>
                    <a name="//apple_ref/swift/Property/containerContentName" class="dashAnchor"></a>
                    <a class="token" href="#/s:6Proton10AttachmentC20containerContentNameSo08PREditordE0CSgvp">containerContentName</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Name of the content for the <code><a href="../Classes/EditorView.html">EditorView</a></code></p>
<div class="aside aside-see-also">
    <p class="aside-title">See also</p>
    <code><a href="../Classes/EditorView.html">EditorView</a></code>

</div>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">containerContentName</span><span class="p">:</span> <span class="kt"><a href="../Structs/EditorContent.html">EditorContent</a></span><span class="o">.</span><span class="kt">Name</span><span class="p">?</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:6Proton10AttachmentC11contentViewSo6UIViewCSgvp"></a>
                    <a name="//apple_ref/swift/Property/contentView" class="dashAnchor"></a>
                    <a class="token" href="#/s:6Proton10AttachmentC11contentViewSo6UIViewCSgvp">contentView</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Undocumented</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">private(set)</span> <span class="k">var</span> <span class="nv">contentView</span><span class="p">:</span> <span class="kt">UIView</span><span class="p">?</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:6Proton10AttachmentC15containerBoundsSo6CGRectVSgvp"></a>
                    <a name="//apple_ref/swift/Property/containerBounds" class="dashAnchor"></a>
                    <a class="token" href="#/s:6Proton10AttachmentC15containerBoundsSo6CGRectVSgvp">containerBounds</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Bounds of the container</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">containerBounds</span><span class="p">:</span> <span class="kt">CGRect</span><span class="p">?</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:@M@Proton@objc(cs)Attachment(py)bounds"></a>
                    <a name="//apple_ref/swift/Property/bounds" class="dashAnchor"></a>
                    <a class="token" href="#/c:@M@Proton@objc(cs)Attachment(py)bounds">bounds</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>The bounds rectangle, which describes the attachment&rsquo;s location and size in its own coordinate system.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="k">override</span> <span class="k">var</span> <span class="nv">bounds</span><span class="p">:</span> <span class="kt">CGRect</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:6Proton10AttachmentC5imageAcA0B5ImageV_tcfc"></a>
                    <a name="//apple_ref/swift/Method/init(image:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:6Proton10AttachmentC5imageAcA0B5ImageV_tcfc">init(image:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Initializes an attachment with the image provided.</p>
<div class="aside aside-note">
    <p class="aside-title">Note</p>
    Image and Size can be updated by invoking <code>updateImage(image: size:)</code> at any time

</div>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="nv">image</span><span class="p">:</span> <span class="kt"><a href="../Structs/AttachmentImage.html">AttachmentImage</a></span><span class="p">)</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>image</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Image to be used to display in the attachment.  Image is rendered as Inline content.</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:6Proton10AttachmentC_4size15backgroundColorAcA0B15TypeIdentifying_AA013EditorContentG0So6UIViewCXc_AA0B4SizeOSo7UIColorCSgtcfc"></a>
                    <a name="//apple_ref/swift/Method/init(_:size:backgroundColor:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:6Proton10AttachmentC_4size15backgroundColorAcA0B15TypeIdentifying_AA013EditorContentG0So6UIViewCXc_AA0B4SizeOSo7UIColorCSgtcfc">init(_:<wbr>size:<wbr>backgroundColor:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Initializes the attachment with the given content view</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="n">_</span> <span class="nv">contentView</span><span class="p">:</span> <span class="kt"><a href="../Typealiases.html#/s:6Proton14AttachmentViewa">AttachmentView</a></span><span class="p">,</span> <span class="nv">size</span><span class="p">:</span> <span class="kt"><a href="../Enums/AttachmentSize.html">AttachmentSize</a></span><span class="p">,</span> <span class="nv">backgroundColor</span><span class="p">:</span> <span class="kt">UIColor</span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">)</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>contentView</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Content view to be hosted within the attachment</p>
                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>size</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Size rule for attachment</p>
                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>backgroundColor</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Background color of attachment. Can be used with DEBUG to track the attachment size/location with respect to content view</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:6Proton10AttachmentC11setSelectedyySbF"></a>
                    <a name="//apple_ref/swift/Method/setSelected(_:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:6Proton10AttachmentC11setSelectedyySbF">setSelected(_:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Selects the attachment in Editor.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">setSelected</span><span class="p">(</span><span class="n">_</span> <span class="nv">isSelected</span><span class="p">:</span> <span class="kt">Bool</span><span class="p">)</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>isSelected</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p><code>true</code> to set selected, else <code>false</code></p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:6Proton10AttachmentC15didChangeBounds_03oldE0ySo6CGRectV_AGtF"></a>
                    <a name="//apple_ref/swift/Method/didChangeBounds(_:oldBounds:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:6Proton10AttachmentC15didChangeBounds_03oldE0ySo6CGRectV_AGtF">didChangeBounds(_:<wbr>oldBounds:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Causes invalidation of layout of the attachment when the containing view bounds are changed</p>
<div class="aside aside-see-also">
    <p class="aside-title">See also</p>
    <code><a href="../Protocols/BoundsObserving.html">BoundsObserving</a></code>

</div>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">didChangeBounds</span><span class="p">(</span><span class="n">_</span> <span class="nv">bounds</span><span class="p">:</span> <span class="kt">CGRect</span><span class="p">,</span> <span class="nv">oldBounds</span><span class="p">:</span> <span class="kt">CGRect</span><span class="p">)</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>bounds</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Updated bounds</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:6Proton10AttachmentC19removeFromContaineryyF"></a>
                    <a name="//apple_ref/swift/Method/removeFromContainer()" class="dashAnchor"></a>
                    <a class="token" href="#/s:6Proton10AttachmentC19removeFromContaineryyF">removeFromContainer()</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Removes this attachment from the <code><a href="../Classes/EditorView.html">EditorView</a></code> it is contained in.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">removeFromContainer</span><span class="p">()</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:6Proton10AttachmentC16rangeInContainerSo8_NSRangeVSgyF"></a>
                    <a name="//apple_ref/swift/Method/rangeInContainer()" class="dashAnchor"></a>
                    <a class="token" href="#/s:6Proton10AttachmentC16rangeInContainerSo8_NSRangeVSgyF">rangeInContainer()</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Range of this attachment in it&rsquo;s container</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">rangeInContainer</span><span class="p">()</span> <span class="o">-&gt;</span> <span class="kt">NSRange</span><span class="p">?</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:6Proton10AttachmentC32addedAttributesOnContainingRange16rangeInContainer10attributesySo8_NSRangeV_SDySo21NSAttributedStringKeyaypGtF"></a>
                    <a name="//apple_ref/swift/Method/addedAttributesOnContainingRange(rangeInContainer:attributes:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:6Proton10AttachmentC32addedAttributesOnContainingRange16rangeInContainer10attributesySo8_NSRangeV_SDySo21NSAttributedStringKeyaypGtF">addedAttributesOnContainingRange(rangeInContainer:<wbr>attributes:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Invoked when attributes are added in the containing <code><a href="../Classes/EditorView.html">EditorView</a></code> in the range of string in which this attachment is contained.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">addedAttributesOnContainingRange</span><span class="p">(</span><span class="n">rangeInContainer</span> <span class="nv">range</span><span class="p">:</span> <span class="kt">NSRange</span><span class="p">,</span> <span class="nv">attributes</span><span class="p">:</span> <span class="p">[</span><span class="kt">NSAttributedString</span><span class="o">.</span><span class="kt">Key</span> <span class="p">:</span> <span class="kt">Any</span><span class="p">])</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>range</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Affected range</p>
                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>attributes</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Attributes applied</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:6Proton10AttachmentC36removedAttributesFromContainingRange16rangeInContainer10attributesySo8_NSRangeV_SaySo21NSAttributedStringKeyaGtF"></a>
                    <a name="//apple_ref/swift/Method/removedAttributesFromContainingRange(rangeInContainer:attributes:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:6Proton10AttachmentC36removedAttributesFromContainingRange16rangeInContainer10attributesySo8_NSRangeV_SaySo21NSAttributedStringKeyaGtF">removedAttributesFromContainingRange(rangeInContainer:<wbr>attributes:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        
                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">removedAttributesFromContainingRange</span><span class="p">(</span><span class="n">rangeInContainer</span> <span class="nv">range</span><span class="p">:</span> <span class="kt">NSRange</span><span class="p">,</span> <span class="nv">attributes</span><span class="p">:</span> <span class="p">[</span><span class="kt">NSAttributedString</span><span class="o">.</span><span class="kt">Key</span><span class="p">])</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>range</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Affected range</p>
                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>attributes</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Attributes removed</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/c:@M@Proton@objc(cs)Attachment(im)attachmentBoundsForTextContainer:proposedLineFragment:glyphPosition:characterIndex:"></a>
                    <a name="//apple_ref/swift/Method/attachmentBounds(for:proposedLineFragment:glyphPosition:characterIndex:)" class="dashAnchor"></a>
                    <a class="token" href="#/c:@M@Proton@objc(cs)Attachment(im)attachmentBoundsForTextContainer:proposedLineFragment:glyphPosition:characterIndex:">attachmentBounds(for:<wbr>proposedLineFragment:<wbr>glyphPosition:<wbr>characterIndex:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Returns the calculated bounds for the attachment based on size rule and content view provided during initialization.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="k">override</span> <span class="kd">func</span> <span class="nf">attachmentBounds</span><span class="p">(</span><span class="k">for</span> <span class="nv">textContainer</span><span class="p">:</span> <span class="kt">NSTextContainer</span><span class="p">?,</span> <span class="n">proposedLineFragment</span> <span class="nv">lineFrag</span><span class="p">:</span> <span class="kt">CGRect</span><span class="p">,</span> <span class="n">glyphPosition</span> <span class="nv">position</span><span class="p">:</span> <span class="kt">CGPoint</span><span class="p">,</span> <span class="n">characterIndex</span> <span class="nv">charIndex</span><span class="p">:</span> <span class="kt">Int</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">CGRect</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>textContainer</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Text container for attachment</p>
                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>lineFrag</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Line fragment containing the attachment</p>
                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>position</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Position in the text container.</p>
                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>charIndex</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Character index</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:6Proton10AttachmentC6update4withyAA0B5ImageV_tF"></a>
                    <a name="//apple_ref/swift/Method/update(with:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:6Proton10AttachmentC6update4withyAA0B5ImageV_tF">update(with:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Undocumented</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">update</span><span class="p">(</span><span class="n">with</span> <span class="nv">image</span><span class="p">:</span> <span class="kt"><a href="../Structs/AttachmentImage.html">AttachmentImage</a></span><span class="p">)</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:6Proton10AttachmentC6update_4sizeyAA0B15TypeIdentifying_AA013EditorContentF0So6UIViewCXc_AA0B4SizeOtF"></a>
                    <a name="//apple_ref/swift/Method/update(_:size:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:6Proton10AttachmentC6update_4sizeyAA0B15TypeIdentifying_AA013EditorContentF0So6UIViewCXc_AA0B4SizeOtF">update(_:<wbr>size:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Undocumented</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">update</span><span class="p">(</span><span class="n">_</span> <span class="nv">contentView</span><span class="p">:</span> <span class="kt"><a href="../Typealiases.html#/s:6Proton14AttachmentViewa">AttachmentView</a></span><span class="p">,</span> <span class="nv">size</span><span class="p">:</span> <span class="kt"><a href="../Enums/AttachmentSize.html">AttachmentSize</a></span><span class="p">)</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:6Proton10AttachmentC40getFullTextRangeIdentificationAttributesSDySo21NSAttributedStringKeyaypGyF"></a>
                    <a name="//apple_ref/swift/Method/getFullTextRangeIdentificationAttributes()" class="dashAnchor"></a>
                    <a class="token" href="#/s:6Proton10AttachmentC40getFullTextRangeIdentificationAttributesSDySo21NSAttributedStringKeyaypGyF">getFullTextRangeIdentificationAttributes()</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Undocumented</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">getFullTextRangeIdentificationAttributes</span><span class="p">()</span> <span class="o">-&gt;</span> <span class="p">[</span><span class="kt">NSAttributedString</span><span class="o">.</span><span class="kt">Key</span> <span class="p">:</span> <span class="kt">Any</span><span class="p">]</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:6Proton10AttachmentC16invalidateLayoutyyF"></a>
                    <a name="//apple_ref/swift/Method/invalidateLayout()" class="dashAnchor"></a>
                    <a class="token" href="#/s:6Proton10AttachmentC16invalidateLayoutyyF">invalidateLayout()</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Invalidates the current layout and triggers a layout update.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">invalidateLayout</span><span class="p">()</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
          </section>
        </section>
        <section id="footer">
          <p>&copy; 2024 <a class="link" href="" target="_blank" rel="external noopener">Rajdeep Kwatra</a>. All rights reserved. (Last updated: 2024-05-15)</p>
          <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
        </section>
      </article>
    </div>
  </body>
</html>
